/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ucmconfchecker.conformance;

import java.util.ArrayList;
import java.util.Date;

/**
 *
 * @author Alex
 */
public class SimpleEventTrace<T> extends ArrayList<Event<T>> implements EventTrace<T>{

    private Date timeStart;
    private Date timeFinish;
    private final String name;

    public SimpleEventTrace(String name){
        this.name = name;
    }
    public Date getTimeStart() {
        return timeStart;
    }

    public Date getTimeFinish() {
        return timeFinish;
    }

    public Long getTimeLength() {
        if(timeFinish!=null && timeStart!=null){
            return timeFinish.getTime()-timeStart.getTime();
        }return null;
    }

    public void setTimeStart(Date timeStart) {
        this.timeStart = timeStart;
    }

    public void setTimeFinish(Date timeFinish) {
        this.timeFinish = timeFinish;
    }

    public String getName() {
       return name;
    }

    
}
